Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update snapchat_agent.php #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update snapchat_agent.php #60

wants to merge 2 commits into from

Conversation

acdameli
Copy link

separate isMedia into isImage and isVideo functions which can be used independently to identify if the media is an image or a video. The isMedia function relies on the individual functions and allows a consumer of this class to use these headers which are much more accurate than the media_type attribute which I have (anecdotally) found to be unreliable.

You seem to prefer the more verbose:

if (test) {
  return TRUE;
}
return FALSE;

pattern, I didn't look very hard for contribution guidelines so I went with the a condensed style. Let me know if you have a strong preference for the other style.

separate isMedia into isImage and isVideo functions which can be used independently to identify if the media is an image or a video. The isMedia function relies on the individual functions and allows a consumer of this class to use these headers which are much more accurate than the media_type attribute which I have (anecdotally) found to be unreliable.
terrible syntax error, dropped a semicolon
@Voiceeeeee
Copy link

You need to change line 180
return isImage($data) || isVideo($data);
To
return $this->isImage($data) || $this->isVideo($data);
Or else you'll get an undefined function error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants